/**
 * @ author: 汪孟苹
 */
define(["jquery",
    "scprit/followup/app/healthAssess/healthRecord.servers.js",
    "scprit/followup/app/healthAssess/healthPatient.ui.js",
    "scprit/followup/app/question/question.ui.js",
    "scprit/followup/app/question/question.event.js"],
    function ($,$healthRecordServers,$healthPatientUi,$questionUi,$questionEvent) {
    var healthRecord = {};

    /**
     * 请求问卷成功后的回调函数
     */
    var ajaxQuestCallBack = function(data,params){
        $questionUi.init({
            id: params.domId,
            list: data.quesInfo,
            showIcon: true,
            values:data.values,
            status:"readonly"
        });
        $questionEvent.init();
    }

    healthRecord.init = function(){
        $healthPatientUi.titInit({
            "id":"healthRecordTit",
            "tit":$healthRecordServers.getPageParams().extInfo.recordName
        });
        var params = { domId:"healthRecord" };
        $healthRecordServers.ajaxQuest(ajaxQuestCallBack,params);
    }

    return healthRecord;
});